@mixin Textflow($n){
    overflow:hidden; 
    text-overflow:ellipsis;
    display:-webkit-box; 
    -webkit-box-orient:vertical;
    -webkit-line-clamp:$n; 
}

// 用来转换
@function ptr($px) {
    @return $px / 75 * 1rem;
}

// 字号 @include fontDpr(16px);
@mixin fontDpr($font-size){
    font-size: $font-size;
    [data-dpr="2"] & {
        font-size: $font-size * 1.09;
    }
    [data-dpr="3"] & {
        font-size: $font-size * 1.25;
    }
}

// 圆角
@mixin border-radius($radius) {
  -webkit-border-radius: $radius;
     -moz-border-radius: $radius;
      -ms-border-radius: $radius;
          border-radius: $radius;
}

/* Clearfix
  ========================================================================== */

@mixin clearfix() {
  & {
      *zoom: 1;
  }
  &:before,
  &:after {
      content: "";
      display: table;
  }
  &:after {
      clear: both;
  }
}

/* Center-align a block level element
  ========================================================================== */

@mixin center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

// border 
@mixin border($direction, $width, $style, $color) {
  border-#{$direction}: $width $style $color;
}


// calc
@mixin heightBox($h){
   height: calc(100% - #{$h});
}

@mixin widthBox($h){
   width: calc(100% - #{$h});
}
